<#include "/common/defaultEngine.html"/>
<@pageTheme mark="${config.optimize()?string('true', 'false')}">
<@header title="设备管理" bodyClass="white-bg" libs=["bootstrapSelect"]/>
<div class="wrapper wrapper-content ibox-content">
    <@f.form id="task-form-complete" class="form-horizontal">
    <h4 class="form-header h4"><@ctx.i18n text = "基本信息"/></h4>

    <div class="row">
        <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "设备名称"/>：</label>
                    <div class="col-sm-8">
                        <div class="input-group date">
                            <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->

                            <input class="form-control" name="equipmentName" value="" type="text"   >
                        </div>
                    </div>
                </div>
            </div>
        <div class="col-sm-6">
            <div class="form-group">
                <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "设备型号"/>：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->

                        <input class="form-control" name="equipmentModel" value="" type="text"   >
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-sm-6">
            <div class="form-group">
                <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "测量范围"/>：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->

                        <input class="form-control" name="measuringRange" value="" type="text"   >
                    </div>
                </div>
            </div>
        </div>
        <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "国标编号"/>：</label>
                    <div class="col-sm-8">
                        <div class="input-group date">
                            <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->

                            <input class="form-control" name="standardCode" value="" type="text"   >
                        </div>
                    </div>
                </div>
            </div>
    </div>
    <div class="row">
        <div class="col-sm-6">
            <div class="form-group">
                <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "详细配置"/>：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->

                        <input class="form-control" name="configure" value="" type="text"   >
                    </div>
                </div>
            </div>
        </div>
        <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "计量单位"/>：</label>
                    <div class="col-sm-8">
                        <div class="input-group date">
                            <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->

                            <!--<input class="form-control" name="meteringUnit" value="" type="text"   >-->
                            <@f.select name="meteringUnit" value="" items=meteringList itemLabel="className" itemValue="className"
                            required=true/>

                        </div>
                    </div>
                </div>



        </div>
    </div>
    <div class="row">
        <div class="col-sm-6">
            <div class="form-group">
                <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "制造厂家"/>：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->

                        <input class="form-control" name="manufacturer" value="" type="text"   >
                    </div>
                </div>
            </div>
        </div>
        <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "设备分类"/>：</label>
                    <div class="col-sm-8">
                        <div class="input-group date">
                            <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->
                            <!--<input class="form-control" name="equipmentType" value="" type="text"   >-->
                            <@f.treeselect  name="equipmentType" boxTitle="请选择设备分类" value="" labelValue=""
                            url="bus/classify/treeData"  keyName="className" keyId="className"
                             expandLevel=true  placeholder="请选择设备分类"/>



                        </div>
                    </div>
                </div>
            </div>
    </div>
    <div class="row">
        <div class="col-sm-6">
            <div class="form-group">
                <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "入账日期"/>：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        <input class="form-control time-input" name="putTime"  data-type="date" data-format="yyyy-MM-dd HH:mm:ss" type="text"  >
                        <!--<input class="form-control" name="putTime" value="" type="text"  readonly >-->
                    </div>
                </div>
            </div>
        </div>
        <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "存放地点"/>：</label>
                    <div class="col-sm-8">
                        <div class="input-group date">
                            <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->
                            <@f.select name="depositAddr" value=""  items=addrList itemLabel="className" itemValue="className"
                            required=true/>
                            <!--<input class="form-control" name="depositAddr" value="" type="text"   >-->
                        </div>
                    </div>
                </div>
            </div>
    </div>
    <div class="row">
        <div class="col-sm-6">
            <div class="form-group">
                <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "购买日期"/>：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        <input class="form-control time-input" name="purchaseTime"  data-type="date" data-format="yyyy-MM-dd HH:mm:ss" type="text"  >
                        <!--<input class="form-control" name="purchaseTime" value="" type="text"  readonly >-->
                    </div>
                </div>
            </div>
        </div>
        <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "使用部门"/>：</label>
                    <div class="col-sm-8">
                        <div class="input-group date">
                            <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->
                            <@f.select name="useDepartment" value=""   items=useList itemLabel="className" itemValue="className"
                            required=true/>
                            <!--<input class="form-control" name="useDepartment" value="" type="text"   >-->
                        </div>
                    </div>
                </div>
            </div>
    </div>
    <div class="row">
        <div class="col-sm-6">
            <div class="form-group">
                <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "使用情况"/>：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->
                        <@f.select name="usages" value=""   items=usagesList itemLabel="className" itemValue="className"
                        required=true/>
                        <!--<input class="form-control" name="usages" value="" type="text"   >-->
                    </div>
                </div>
            </div>
        </div>
        <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "出厂日期"/>：</label>
                    <div class="col-sm-8">
                        <div class="input-group date">
                            <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                            <input class="form-control time-input" name="productionTime"  data-type="date" data-format="yyyy-MM-dd HH:mm:ss" type="text"  >

                            <!--<input class="form-control" name="productionTime" value="" type="text"  readonly >-->
                        </div>
                    </div>
                </div>
            </div>
    </div>
    <div class="row">
        <div class="col-sm-6">
            <div class="form-group">
                <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "设备原值"/>：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->

                        <input class="form-control" name="equipmentValue" value="" type="text"   >
                    </div>
                </div>
            </div>
        </div>
        <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "折旧方法"/>：</label>
                    <div class="col-sm-8">
                        <div class="input-group date">
                            <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->
                            <@f.select name="depreciation" value=""   items=depreciationList itemLabel="className" itemValue="className"
                            required=true/>
                            <!--<input class="form-control" name="depreciation" value="" type="text"   >-->
                        </div>
                    </div>
                </div>
            </div>
    </div>
    <div class="row">
        <div class="col-sm-6">
            <div class="form-group">
                <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "增加方式"/>：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->
                        <@f.select name="increase" value=""   items=increaseList itemLabel="className" itemValue="className"
                        required=true/>
                        <!--<input class="form-control" name="increase" value="" type="text"   >-->
                    </div>
                </div>
            </div>
        </div>
        <div class="col-sm-6">
            <div class="form-group">
                <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "保管人员"/>：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->
                        <@f.select name="safekeeping" value=""   items=safekeepingList itemLabel="className" itemValue="className"
                        required=true/>
                        <!--<input class="form-control" name="safekeeping" value="" type="text"   >-->
                    </div>
                </div>
            </div>
        </div>

    </div>
    <div class="row">
        <div class="col-sm-6">
            <div class="form-group">
                <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "使用年限"/>：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->

                        <input class="form-control" name="age" value="" type="text"  >
                    </div>
                </div>
            </div>
        </div>
        <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "净残值率"/>：</label>
                    <div class="col-sm-8">
                        <div class="input-group date">
                            <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->

                            <input class="form-control" name="jingcanValue" value="" type="text"   >
                        </div>
                    </div>
                </div>
            </div>

    </div>
    <div class="row">
        <div class="col-sm-6">
            <div class="form-group">
                <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "净值"/>：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->

                        <input class="form-control" name="worth" value="" type="text"   >
                    </div>
                </div>
            </div>
        </div>
        <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "累计折旧"/>：</label>
                    <div class="col-sm-8">
                        <div class="input-group date">
                            <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->

                            <input class="form-control" name="accumulatedDepreciation" value="" type="text"   >
                        </div>
                    </div>
                </div>
            </div>

    </div>
    <div class="row">
        <div class="col-sm-6">
            <div class="form-group">
                <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "二维码"/>：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->

                        <input class="form-control" name="code" value="" type="text"   >
                    </div>
                </div>
            </div>
        </div>
        <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "条码宽度"/>：</label>
                    <div class="col-sm-8">
                        <div class="input-group date">
                            <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->

                            <input class="form-control" name="codeWidth" value="" type="text"   >
                        </div>
                    </div>
                </div>
            </div>
    </div>
    <div class="row">
        <div class="col-sm-6">
            <div class="form-group">
                <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "字符一"/>：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->

                        <input class="form-control" name="character1" value="" type="text"   >
                    </div>
                </div>
            </div>
        </div>
        <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "字符二"/>：</label>
                    <div class="col-sm-8">
                        <div class="input-group date">
                            <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->

                            <input class="form-control" name="character2" value="" type="text"   >
                        </div>
                    </div>
                </div>
            </div>
    </div>
    <div class="row">
        <div class="col-sm-6">
            <div class="form-group">
                <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "字符三"/>：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->

                        <input class="form-control" name="character3" value="" type="text"   >
                    </div>
                </div>
            </div>
        </div>
        <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "字符四"/>：</label>
                    <div class="col-sm-8">
                        <div class="input-group date">
                            <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->

                            <input class="form-control" name="character4" value="" type="text"   >
                        </div>
                    </div>
                </div>
            </div>
    </div>
    <div class="row">
        <div class="col-sm-6">
            <div class="form-group">
                <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "字符五"/>：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->

                        <input class="form-control" name="character5" value="" type="text"   >
                    </div>
                </div>
            </div>
        </div>
        <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "字符六"/>：</label>
                    <div class="col-sm-8">
                        <div class="input-group date">
                            <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->

                            <input class="form-control" name="character6" value="" type="text"   >
                        </div>
                    </div>
                </div>
            </div>
    </div>
    <div class="row">
        <div class="col-sm-6">
            <div class="form-group">
                <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "数值一"/>：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->

                        <input class="form-control" name="value1" value="" type="text"   >
                    </div>
                </div>
            </div>
        </div>
        <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "数值二"/>：</label>
                    <div class="col-sm-8">
                        <div class="input-group date">
                            <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->

                            <input class="form-control" name="value2" value="" type="text"   >
                        </div>
                    </div>
                </div>
            </div>
    </div>
    <div class="row">
        <div class="col-sm-6">
            <div class="form-group">
                <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "数值三"/>：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->

                        <input class="form-control" name="value3" value="" type="text"   >
                    </div>
                </div>
            </div>
        </div>
        <div class="col-sm-6">
            <div class="form-group">
                <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "计量时间"/>：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->
                        <input class="form-control time-input" name="meterageTime"  data-type="date" data-format="yyyy-MM-dd HH:mm:ss" type="text"  >
                        <!--<input class="form-control" name="putTime" value="" type="text"  readonly >-->
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-sm-6">
            <div class="form-group">
                <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "计量公司"/>：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->

                        <input class="form-control" name="meterageCompany" value="" type="text"   >
                    </div>
                </div>
            </div>
        </div>
        <div class="col-sm-6">
            <div class="form-group">
                <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "计量公司编号"/>：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->

                        <input class="form-control" name="companyCode" value="" type="text"   >
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <!--<div class="col-sm-6">-->
            <!--<div class="form-group">-->
                <!--<label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "测量范围"/>：</label>-->
                <!--<div class="col-sm-8">-->
                    <!--<div class="input-group date">-->
                        <!--&lt;!&ndash;<span class="input-group-addon"><i class="fa fa-calendar"></i></span>&ndash;&gt;-->

                        <!--<input class="form-control" name="measuringRange" value="" type="text"   >-->
                    <!--</div>-->
                <!--</div>-->
            <!--</div>-->
        <!--</div>-->
        <div class="col-sm-6">
            <div class="form-group">
                <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "备注"/>：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->

                        <input class="form-control" name="remark" value="" type="text"   >
                    </div>
                </div>
            </div>
        </div>
    </div>




</@f.form>
<div class="hr-line-dashed"></div>
<div class="row" style="text-align: center;" id="_addTab">
    <!--<button type="button" class="btn btn-sm btn-primary" onclick="opt.form.submit()"><i class="fa fa-check"></i><@ctx.i18n text = "保存"/></button>&nbsp;-->
    <button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i><@ctx.i18n text = "保存"/></button>&nbsp;
    <button type="button" class="btn btn-sm btn-danger" onclick="opt.modal.closeTab()"><i class="fa fa-reply-all"></i><@ctx.i18n text = "关闭"/></button>
</div>
</div>
<@footer>
<script type="text/javascript">
    var prefix = baseURL + "bus/equipment";

    $('#tipBut button').click(function(){
        $('#comment').text($(this).text())
    });

    $("#task-form-complete").validate({
        focusCleanup: true
    });




    function tableCallback(id, event, index, layero, nodes){
        console.log("aaaaaaaaaaaaaaa")
        if(id == "projectName"){
            console.log("弹出表格选择===>>>>: id:" + id + "  event:" + event + " index:" + index + "  layero:"+ layero + " nodes:" + JSON.stringify(nodes));
            console.log(nodes.table[0]);
            var data = nodes.table[0];

            $("input[name=region]").val(data.region);

        }
    }

    function submitHandler() {

       //  var arrivalAmount= parseFloat($('input[name="arrivalAmount"]').val());
       //  var claimAmount= parseFloat($('input[name="claimAmount"]').val());
       //  console.log(arrivalAmount);
       //  console.log(claimAmount);
       //  console.log(claimAmount>arrivalAmount);
       // if(claimAmount>arrivalAmount){
       //   //  alert("已认领金额不能大于到账金额");
       //   return  opt.modal.alertWarning("已认领金额不能大于到账金额");
       // }

        if (opt.validate.form()) {
            opt.operate.saveTab(prefix + "/add", $('#task-form-complete').serialize());
        }
    }
</script>
</@footer>
</@pageTheme>